//
//  Constants.h
//  takeout
//
//  Created by Mac on 12-2-27.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#define APP_ID 560731876
#define VERSION_NUMBER @"1.0.0"
#define SERVICE_DOMAIN @"http://songzu.dns23.49host.com/takeout/service/%@"
#define SERVICE_ALL_SUPPLIERS_CATEGORIES @"showAllSupplierCategories"
#define SERVICE_ALL_SUPPLIERS @"showAllSuppliers"
#define SERVICE_ALL_SUPPLIERS_BY_CATEGORIES @"showSuppliers%@"
#define SERVICE_ALL_DISHES_BY_SUPPLIER @"showSupplierDishes?supId=%@"
#define SERVICE_SEARCH @"search?qtxt=%@"
#define SERVICE_SEARCH_SUPPLIER_BY_ID @"searchSupplierById?supId=%@"
#define SERVICE_ERROR_REPORT @"feedBack?desc=%@&type=E"
#define SERVICE_FEEDBACK @"feedBack?desc=%@&type=F"
#define SERVICE_GETVERSION @"getVersion"
#define SERVICE_AD_BY_POSITION @"ads%@"
#define SUCCESS_MSG @"success"

#define PAGEINDEX @"page=%d"
#define PAGESIZE  @"pageSize=5"

#define ROAD @"road=%@"
#define ISSELLING @"isSelling=%@"

#define IMAGE_FOLDER @"Documents/Images"
#define kMaxThreadNumber 6
#define PRICE_BY_TIME 9999

#define SHOW_LOG
#ifdef SHOW_LOG
    #define CUSTOM_LOG(msg) NSLog(@"%s:\n%@",__FUNCTION__,(msg))
#else
    #define CUSTOM_LOG(msg) 
#endif

#define RemoveAllSubViews(view) \
for(UIView* subView in view.subviews)\
{\
[subView removeFromSuperview];\
}\

#define CustomeAlert(msg)\
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:msg delegate:self cancelButtonTitle:nil \
    otherButtonTitles:@"OK", nil];\
[alertView show];\
[alertView release];\

#define CustomeAlertWithTitle(title, msg)\
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title message:msg delegate:self cancelButtonTitle:nil \
otherButtonTitles:@"OK", nil];\
[alertView show];\

